// 引入上一任前段封装的axios
import axios from '../../network/axios'

// 新增店铺销售，继续录入
export const add_store_sales_api = (data) => {
  return axios({
    method: 'POST',
    url: '/vip-sell-total/insert',
    data
  })
}

// 删除VIP销售记录
export const delete_vip_sales_api = (params) => {
  return axios({
    method: 'DELETE',
    url: '/vip-sell-total/deleteSell',
    params
  })
}
// 删除VIP销售记录
export const query_store_sales_api = (params) => {
  return axios({
    method: 'GET',
    url: '/vip-sell-total/getVipSell',
    params
  })
}
/* 
  参数设定模块 （vip店铺全局设置控制层）
*/
// 新增/修改

export const add_params_setting_api = (data) => {
  return axios({
    method: 'POST',
    url: '/vip-system-config/insertOrUpdate',
    data
  })
}

// 结账页面点击确认
export const accounts_confrim_api = (data) => {
  return axios({
    method: 'POST',
    url: '/vip-sell-total/updateStatus',
    data
  })
}

// 付款方式查询api
export const pay_methods_api = () => {
  return axios({
    method: 'GET',
    url: '/vip-payment/list'
  })
}
// 新建页面的确认
export const confirm_api = (params) => {
  return axios({
    method: 'PUT',
    url: '/vip-sell-total/affirm',
    params
  })
}
// 编辑店铺销售记录(底部表格失去焦点的时候)
export const edit_bottom_table_blur_api = (data) => {
  return axios({
    method: 'PUT',
    url: '/vip-sell-total/updateVipSell',
    data
  })
}

// 获取积分/积分兑换数据（结账时调用）
export const get_ji_fen_duihuan_data_api = (params) => {
  return axios({
    method: 'GET',
    url: '/vip-sell-total/getVipIntegral',
    params
  })
}
// 通过vipSellSequence销售序号查询，点击关闭的时候，触发的api （店铺销售查询）
export const query_by_sellSequence_api = (params) => {
  return axios({
    method: 'GET',
    url: '/vip-sell-total/getVipSell',
    params
  })
}
// 点击删单的时候，触发的api(删除VIP销售记录)
export const delete_dan_deleteSell_api = (data) => {
  return axios({
    method: 'POST',
    url: '/vip-sell-total/deleteSell',
    data
  })
}

// 当完成了中间表格相关的数据之后，要开始请求折数（后端新增）(vip促销控制层)
export const get_discount_api = (params) => {
  return axios({
    method: 'GET',
    url: '/vip-promotion/getStyleNumberDiscount',
    params
  })
}
